<#macro layout>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>洪洞人在京根据地</title>
        <base href="${CONTEXT_PATH}/"/>
        <link rel="stylesheet" href="static/frozenui/css/frozen.css">
        <link rel="stylesheet" href="static/frozenui/css/demo.css">
        <script src="static/frozenui/lib/zepto.min.js"></script>
        <script src="static/frozenui/js/frozen.js"></script>
        <script src="static/frozenui/lib/tips.js"></script>
<style>
	.clearfix::after {clear: both;content: ".";display: block;height: 0;visibility: hidden;}
	.ui-list {padding-right: 3%;width: 97%;}
	.top{width:100%;background:#fff;}
	.login_nav {border-bottom: 1px solid #e5e5e5; width:100%;}
	.login_nav li.active {border-bottom: 4px solid #009ad3;color:#009ad3;}
	.login_nav li { float: left;height: 40px;line-height: 40px;margin-left: 2%;text-align: center;width: 18%;color:#909090;}
	.demo-block-index{margin-top: 10px;}
	.ui-list {font-size: 14px;}
</style>
        
        <script type="text/javascript">
		  (function() {
			var curr_user = 0;
			<#if session['wechat_user']??>curr_user = 1</#if>
			if(curr_user != '0'){
				 WgateJs = {};
				    WgateJs.auto_auth=true;
				    WgateJs.gate_options={force:1,info:"basic"};
				    WgateJs.ready=function(){
				      var wgateid=WgateJs.getWgateid();
				      //console.info('wgateid='+wgateid)
				      //alert('wgateid='+wgateid);
				      WgateJs.getWgateUser(function(user){
				    	  //console.info(user)JSON.stringify(user)
				    	  //alert(JSON.stringify(user)); 
				    	  $.get("user/login", {wgateid:wgateid, wgateUser:JSON.stringify(user)}, function(data){
			 				if(data.code == 200){
			 					
			 				}else{
			 					  $.tips({
			 			  				content:"登录失败",
			 			  				stayTime:1000,
			 			  				type:"info"
			 			  			});
			 				}
			 				
				    	  })
				      });
				    }
				    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://st.weixingate.com/";
				    u=u+'st/1602';
				    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
				    g.defer=true; g.async=true; g.src=u; s.parentNode.insertBefore(g,s);
			}
		  })(); 
		</script>
        
    </head>
	<body ontouchstart>
        <header class="ui-header ui-header-positive ui-border-b">
            <i class="ui-icon-return" onclick="history.back()"></i><h1>洪洞人在京根据地</h1><button class="ui-btn">回首页</button>
        </header>
        
		<footer class="ui-footer ui-footer-btn">
            <ul class="ui-tiled ui-border-t">
                <li data-href="/" class="ui-border-r"><div>外出</div></li>
                <li data-href="my"><div>我</div></li>
            </ul>
        </footer>
        

       	<section class="ui-container">
            <#nested>
        </section>
        
	</body>
	
	 <script>
        $('.ui-list li,.ui-tiled li').click(function(){
            if($(this).data('href')){
                location.href= $(this).data('href');
            }
        });
        $('.ui-header .ui-btn').click(function(){
            location.href= '/';
        });
        
        function tips(content){
    		$.tips({
    			content:content,
    			stayTime:2000,
    			type:"info"
    		});
        }
      </script>
</html>
</#macro>